import Request from '@/utils/request'
import { API_CHANNEL_LIST, API_CHANNEL_SAVE, API_CHANNEL_UPDATE,API_CHANNEL_DEL } from '@/constants/api'

export function loadList (data) {
  return new Request({
    url: "http://localhost:9001/api/v1/channel/list",
    method: 'post',
    data
  })
}

export function saveData (data) {
  return new Request({
    url: "http://localhost:9001/api/v1/channel/SaveAndEdit",
    method: 'post',
    data
  })
}

export function updateData (data) {
  return new Request({
    url: "http://localhost:9001/api/v1/channel/SaveAndEdit",
    method: 'post',
    data
  })
}

export function delData (id) {
  return new Request({
    url: "http://localhost:9001/api/v1/channel/delete"+"/"+id,
    method: 'get'
  })
}
// export function getDictList (id) {
//   return new Request({
//     url: "http://localhost:9001/api/v1/channel/upload",
//     method: 'get'
//   })
// }
